<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="/static/bootstrap-5.3.3-dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="/static/bootstrap-5.3.3-dist/js/bootstrap.bundle.min.js"></script>
    <style>
        body{
            background-image:url("/static/images/img.png");
        }
        .footer {
            text-align: center;
            padding: 1rem 0;
            bottom: 10 px;
            background-color: rgb(56, 54, 54);
            color: white;
        }
    </style>
</head>
<body>
     <div class="container">
    <header class="d-flex flex-wrap justify-content-center py-3 mb-4 border-bottom">
      <a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-dark text-decoration-none">
        <svg class="bi me-2" width="40" height="32"><use xlink:href="#bootstrap"></use></svg>
        <span class="fs-4">欢迎{{ username }}</span>
      </a>
      <ul class="nav nav-pills">
        <li class="nav-item"><a href="{% url 'welcome' %}" class="nav-link">主页</a></li>
        <li class="nav-item"><a href="{% url 'joingame' %}" class="nav-link">队伍报名</a></li>
        <li class="nav-item"><a href="{% url 'bookgame' %}" class="nav-link">比赛预约</a></li>
        <li class="nav-item"><a class="nav-link active" aria-current="page">比赛签到</a></li>
          <li class="nav-item"><a href="{% url 'losegame' %}" class="nav-link">队伍弃赛</a></li>
          <li class="nav-item"><a href="{% url 'infogame' %}" class="nav-link">比赛通知</a> </li>

      </ul>
    </header>
  </div>
    <div class="container">
        <h1>队伍签到</h1>
        <form id="signInForm">
            <div class="form-group">
                <label for="teamName">队伍名称</label>
                <input type="text" id="teamName" name="teamName" required>
            </div>
            <div class="form-group">
                <label for="memberName">成员姓名</label>
                <input type="text" id="memberName" name="memberName" required>
            </div>
            <div class="form-group">
                <button type="submit">签到</button>
            </div>
            <div class="success-message" id="successMessage"></div>
        </form>
    </div>
    <div class="footer">
        <p>联系地址：中央财经大学信息学院7号楼</p>
        <p>联系邮箱：qiyeyunying@xjtu.edu.cn  &nbsp;&nbsp; 联系电话：029-82656919-801
        </p>
    </div>
    <script>
        document.getElementById('signInForm').addEventListener('submit', function(event) {
            event.preventDefault();

            const teamName = document.getElementById('teamName').value;
            const memberName = document.getElementById('memberName').value;

            if (teamName && memberName) {
                // 假设这里我们会将签到数据发送到服务器，但在这里只是简单显示成功消息
                document.getElementById('successMessage').textContent = `团队 ${teamName} 的成员 ${memberName} 签到成功！`;
                document.getElementById('signInForm').reset();
            } else {
                alert('请填写所有必填字段。');
            }
        });
    </script>
</body>
</html>